#ifndef SURFACE_RENDERING_DATA_H
#define SURFACE_RENDERING_DATA_H

#include "Textures.h"

struct SurfaceRenderingData {
	float color[4];
	Textures::TEXTURE textureId;
	//float diffuseMaterial[4];
	//float ambientMaterial[4];
	float specularMaterial[4];
	float emissiveMaterial[4];
	float shininess[1];

	SurfaceRenderingData() {
		SetColor(1,1,1,1);
		SetTexture(Textures::TEXTURE_NONE);
		//SetDiffuseMaterial(1,1,1,1);
		//SetAmbientMaterial(1,1,1,1);
		SetSpecularMaterial(0,0,0,1);
		SetEmissiveMaterial(0,0,0,1);
		SetShininess(30);
	}

	SurfaceRenderingData(const SurfaceRenderingData& v) {
		this->textureId = v.textureId;
		this->shininess[0] = v.shininess[0];
		for(int i=0; i<4; ++i) {
			this->color[i] = v.color[i];
			//this->diffuseMaterial[i] = v.diffuseMaterial[i];
			//this->ambientMaterial[i] = v.ambientMaterial[i];
			this->specularMaterial[i] = v.specularMaterial[i];
			this->emissiveMaterial[i] = v.emissiveMaterial[i];
		}
	}

	void SetColor(float r, float g, float b, float a) {
		color[0] = r;
		color[1] = g;
		color[2] = b;
		color[3] = a;
	}

	void SetTexture(Textures::TEXTURE textureId) {
		this->textureId = textureId;
	}

	/*
	void SetDiffuseMaterial(float r, float g, float b, float a) {
		diffuseMaterial[0] = r;
		diffuseMaterial[1] = g;
		diffuseMaterial[2] = b;
		diffuseMaterial[3] = a;
	}

	void SetAmbientMaterial(float r, float g, float b, float a) {
		ambientMaterial[0] = r;
		ambientMaterial[1] = g;
		ambientMaterial[2] = b;
		ambientMaterial[3] = a;
	}
	*/

	void SetEmissiveMaterial(float r, float g, float b, float a) {
		emissiveMaterial[0] = r;
		emissiveMaterial[1] = g;
		emissiveMaterial[2] = b;
		emissiveMaterial[3] = a;
	}

	void SetSpecularMaterial(float r, float g, float b, float a) {
		specularMaterial[0] = r;
		specularMaterial[1] = g;
		specularMaterial[2] = b;
		specularMaterial[3] = a;
	}

	void SetShininess(float shininess) {
		this->shininess[0] = shininess;
	}
};

#endif //SURFACE_RENDERING_DATA_H
